function [mX, mY, CXX, CXY, CYY] = ecmpart(z, m, C)
%ECMPART Partitioning function for missing data algorithms
% Private routine to partition a mean vector m and covariance matrix C
% according to the pattern of NaNs (missing values) in an input vector z.

%	Copyright 2005 The MathWorks, Inc.
%	$Revision: 1.1.6.1 $ $Date: 2005/11/11 16:21:31 $

P = isnan(z);
Q = ~P;

mX = m(P);
mY = m(Q);

CXX = C(P,P);
CXY = C(P,Q);
CYY = C(Q,Q);
